import request from "@/utils/request";

// 分页查询事件记录
export function getEventList(data) {
  return request({
    url: "/api/Event/list",
    method: "post",
    data,
  });
}

// 新增事件记录
export function addEvent(data) {
  return request({
    url: "/api/Event",
    method: "post",
    data,
  });
}

// 更新事件记录
export function updateEvent(id, data) {
  return request({
    url: `/api/Event/${id}`,
    method: "put",
    data,
  });
}

// 删除事件记录
export function deleteEvent(id) {
  return request({
    url: `/api/Event/${id}`,
    method: "delete",
  });
}

// 获取事件详情
export function getEvent(id) {
  return request({
    url: `/api/Event/${id}`,
    method: "get",
  });
}
